Answer the question
In order to leave comments, you need to log in
How to make an actual path to a document in C#?
class Program
{
static void Main()
{
string startPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
bool menu = true;
do
{
Console.WriteLine("Меню: \n0) Закрыть программу \n1) Амелин А.Е. \n2) Климова М.А. \n3) Корнюхов Д.А. \n4) Новиков К.Ю. \n5) Тароло А.А.");
int list = Convert.ToInt32(Console.ReadLine());
switch (list)
{
case 0:
return;
case 1:
do
{
Console.WriteLine("Индивидуальное меню Амелина А.Е. \n1) Реферат на тему /Инновация в образовании/ \n2) Презентация \n3) Перейти к основному меню ");
int list_amelin = Convert.ToInt32(Console.ReadLine());
switch (list_amelin)
{
case 1:
string OutReport = startPath + @"\ПРАКТИКА АМЕЛИН АЕ\АМЕЛИН\Материалы\ПРАКТИКА2020.docx";
Process.Start(@"C:\Program Files (x86)\Microsoft Office\Office16\WINWORD.EXE", OutReport);
break;
case 2:
string OutPresentation = @"C:\Users\Александр\Desktop\ПРАКТИКА\Материалы\АМЕЛИН\ПРАКТИКА2020.pptx";
Process.Start(@"C:\Program Files (x86)\Microsoft Office\Office16\POWERPNT.EXE", OutPresentation);
break;
case 3:
Main();
break;
}
}
while (menu);
break;
Answer the question
In order to leave comments, you need to log in
Personally, I did not understand anything.
Chew something like this
1. Displaying the student menu (some code looks for the base directory)
2. Going to the student / ku
3. Displaying the summary or presentation menu or exiting to the previous one
4. Launching the program by token
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question