Пример #1
0
 /// <summary>
 /// -- Create Protection window:
 /// </summary>
 private void ProtectionBtn_Click(object sender, RoutedEventArgs e)
 {
     if (!pw.IsShowing)
     {
         pw = new ProtectionWindow();
         pw.Show();
     }
     else
     {
         pw.Close();
     }
 }
Пример #2
0
        private void ManagerWindow_ContentRendered(object sender, EventArgs e)
        {
            referenceWindows = new List <ReferenceWindow>();
            drag             = new DragManager();


            pw = new ProtectionWindow();
            WindowListBox.ItemsSource = referenceWindows;

            //Handle when start the program by drag .zrf on the icon.
            var lines = Environment.GetCommandLineArgs();

            if (lines.Length == 2)
            {
                FileInfo f = new FileInfo(lines[1]);
                if (f.Extension.ToLower() == ".zrf")
                {
                    LoadState(lines[1]);
                }
            }

            //To make things easier later:
            Directory.CreateDirectory(Environment.CurrentDirectory + "\\Presets");
        }