Exemple #1
0
 public FormENB()
 {
     InitializeComponent();
     FuncMisc.setFormFont(this);
     if (FormMain.numberStyle > 1)
     {
         imageBackgroundImage();
     }
     if (FormMain.langTranslate == "EN")
     {
         langTranslateEN();
     }
     toolTip1.SetToolTip(label9, textReservedMemory);
     toolTip1.SetToolTip(comboBox_Memory, textReservedMemory);
     toolTip1.SetToolTip(label11, textCompression);
     toolTip1.SetToolTip(button_Compress, textCompression);
     toolTip1.SetToolTip(label10, textExpandMemory);
     toolTip1.SetToolTip(button_ExpandMemory, textExpandMemory);
     toolTip1.SetToolTip(label2, textDOF);
     toolTip1.SetToolTip(button_DOF, textDOF);
     toolTip1.SetToolTip(label3, textAO);
     toolTip1.SetToolTip(button_AO, textAO);
     toolTip1.SetToolTip(label7, textAF);
     toolTip1.SetToolTip(button_AF, textAF);
     toolTip1.SetToolTip(comboBox_AF, textAF);
     toolTip1.SetToolTip(label6, textAA + "EdgeAA");
     toolTip1.SetToolTip(button_EAA, textAA + "EdgeAA");
     toolTip1.SetToolTip(label4, textAA + "SubPixelAA");
     toolTip1.SetToolTip(button_SAA, textAA + "SubPixelAA");
     toolTip1.SetToolTip(label5, textAA + "TemporalAA");
     toolTip1.SetToolTip(button_TAA, textAA + "TemporalAA");
     refreshFileList();
     refreshAllValue();
 }
Exemple #2
0
 public FormENB()
 {
     InitializeComponent();
     FuncMisc.setFormFont(this);
     Directory.SetCurrentDirectory(FormMain.pathLauncherFolder);
     if (FormMain.numberStyle > 1)
     {
         imageBackgroundImage();
     }
     if (FormMain.langTranslate == "EN")
     {
         langTranslateEN();
     }
     toolTip1.SetToolTip(label3, reservedMemory);
     toolTip1.SetToolTip(comboBox3, reservedMemory);
     toolTip1.SetToolTip(button_Compress, compressMemory);
     toolTip1.SetToolTip(label9, compressMemory);
     toolTip1.SetToolTip(button_WaitBuffer, waitBuffer);
     toolTip1.SetToolTip(label6, waitBuffer);
     toolTip1.SetToolTip(label14, occlusionCulling);
     toolTip1.SetToolTip(button_OC, occlusionCulling);
     toolTip1.SetToolTip(label17, expandMemory);
     toolTip1.SetToolTip(buttonExpandMemory, expandMemory);
     refreshFileList();
     refreshAllValue();
 }
 public FormPrograms()
 {
     InitializeComponent();
     FuncMisc.setFormFont(this);
     if (FormMain.numberStyle > 1)
     {
         imageBackgroundImage();
     }
     if (FormMain.langTranslate == "EN")
     {
         langTranslateEN();
     }
 }
Exemple #4
0
 public FormPrograms()
 {
     InitializeComponent();
     FuncMisc.setFormFont(this);
     Directory.SetCurrentDirectory(FormMain.pathLauncherFolder);
     if (FormMain.numberStyle > 1)
     {
         imageBackgroundImage();
     }
     if (FormMain.langTranslate == "EN")
     {
         langTranslateEN();
     }
 }
 public FormUpdates()
 {
     InitializeComponent();
     FuncMisc.setFormFont(this);
     client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
     client.DownloadFileCompleted   += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
     if (FormMain.numberStyle > 1)
     {
         imageBackgroundImage();
     }
     if (FormMain.langTranslate == "EN")
     {
         langTranslateEN();
     }
 }
Exemple #6
0
 public FormOptions()
 {
     InitializeComponent();
     FuncMisc.setFormFont(this);
     Directory.SetCurrentDirectory(FormMain.pathLauncherFolder);
     if (FormMain.numberStyle > 1)
     {
         imageBackgroundImage();
     }
     if (FormMain.langTranslate == "EN")
     {
         langTranslateEN();
     }
     toolTip1.SetToolTip(label16TAB, shadowResolution);
     toolTip1.SetToolTip(comboBoxShadowResTAB, shadowResolution);
     toolTip1.SetToolTip(label21TAB, grassDensity);
     toolTip1.SetToolTip(label22TAB, grassDensity);
     toolTip1.SetToolTip(trackBarGrassTAB, grassDensity);
     toolTip1.SetToolTip(button_RedateMods, redateMods);
     toolTip1.SetToolTip(label5, predictFPS);
     toolTip1.SetToolTip(comboBoxPredictFPS, predictFPS);
     refreshSettings();
 }
 public FormWidget()
 {
     InitializeComponent();
     FuncMisc.setFormFont(this);
     if (FormMain.numberStyle > 1)
     {
         ImageBackgroundImage();
     }
     if (FormMain.langTranslate == "EN")
     {
         langTranslateEN();
     }
     else
     {
         refreshCB2();
     }
     if (FuncParser.readAsBool(FormMain.pathLauncherINI, "General", "HideWebButtons"))
     {
         ClientSize             = new System.Drawing.Size(232, 60);
         label1.Size            = new System.Drawing.Size(232, 60);
         pictureBox4.Visible    = false;
         button_Updates.Visible = false;
     }
 }
Exemple #8
0
 public FormMain()
 {
     InitializeComponent();
     Directory.SetCurrentDirectory(pathLauncherFolder);
     if (File.Exists(pathLauncherINI))
     {
         if (panelFileVersion != FuncParser.stringRead(pathLauncherINI, "General", "Version_CP"))
         {
             FuncParser.iniWrite(pathLauncherINI, "General", "Version_CP", panelFileVersion);
         }
         int wLeft = FuncParser.intRead(pathLauncherINI, "General", "POS_WindowLeft");
         int wTop  = FuncParser.intRead(pathLauncherINI, "General", "POS_WindowTop");
         if (wLeft < 0 || wTop < 0)
         {
             StartPosition = FormStartPosition.CenterScreen;
         }
         else
         {
             if (wLeft > (Screen.PrimaryScreen.Bounds.Width - Size.Width))
             {
                 wLeft = Screen.PrimaryScreen.Bounds.Width - Size.Width;
             }
             if (wTop > (Screen.PrimaryScreen.Bounds.Height - Size.Height))
             {
                 wTop = Screen.PrimaryScreen.Bounds.Height - Size.Height;
             }
             StartPosition = FormStartPosition.Manual;
             Location      = new Point(wLeft, wTop);
         }
         settingsPreset = FuncParser.intRead(pathLauncherINI, "General", "SettingsPreset");
         if (settingsPreset < 0 || settingsPreset > 3)
         {
             settingsPreset = 2;
         }
         numberStyle = FuncParser.intRead(pathLauncherINI, "General", "NumberStyle");
         if (numberStyle < 1 || numberStyle > 2)
         {
             numberStyle = 1;
         }
         if (FuncParser.stringRead(pathLauncherINI, "General", "Language").ToUpper() == "EN")
         {
             langTranslate = "EN";
             setLangTranslateEN();
         }
         else
         {
             setLangTranslateRU();
         }
         predictFPS = FuncParser.intRead(pathLauncherINI, "Game", "PredictFPS");
         if (predictFPS < 30 || predictFPS > 240)
         {
             predictFPS = 60;
         }
         if (!FuncParser.keyExists(pathLauncherINI, "Game", "ZFighting"))
         {
             FuncParser.iniWrite(pathLauncherINI, "Game", "ZFighting", "0");
         }
         int nearDistance = FuncParser.intRead(pathLauncherINI, "Game", "NearDistance");
         if (nearDistance < 15 || nearDistance > 25)
         {
             FuncParser.iniWrite(pathLauncherINI, "Game", "NearDistance", "18");
         }
         customFont = FuncParser.stringRead(pathLauncherINI, "Font", "CP_Font");
         if (customFont != null)
         {
             var ifc = new InstalledFontCollection();
             for (int i = ifc.Families.Length - 1; i >= 0; i--)
             {
                 if (ifc.Families[i].Name == customFont)
                 {
                     FuncMisc.supportStrikeOut(customFont);
                     FuncMisc.setFormFont(this);
                     break;
                 }
                 else if (i == 0)
                 {
                     customFont = null;
                 }
             }
             ifc = null;
         }
     }
     else
     {
         setLangTranslateRU();
         StartPosition = FormStartPosition.CenterScreen;
         OnProcessExit(this, new EventArgs());
     }
     if (!File.Exists(pathSkyrimPrefsINI) || !File.Exists(pathSkyrimINI))
     {
         resetSettings();
     }
     AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnProcessExit);
     refreshStyle();
 }
Exemple #9
0
 public FormMain()
 {
     InitializeComponent();
     Directory.SetCurrentDirectory(pathLauncherFolder);
     if (!Directory.Exists(pathDataFolder))
     {
         MessageBox.Show(@"Панель Управления должна располагаться по адресу: Директория Игры\Любая Папка\" + Environment.NewLine + Environment.NewLine + @"The Control Panel should be located at: Game Directory\Any Folder\");
         Environment.Exit(0);
     }
     string[] arguments = Environment.GetCommandLineArgs();
     if (arguments.Length > 0)
     {
         foreach (string line in arguments)
         {
             if (line.StartsWith("-s=", StringComparison.OrdinalIgnoreCase))
             {
                 argsStartsWith = line.Remove(0, 3);
             }
             else if (line.StartsWith("-w=", StringComparison.OrdinalIgnoreCase))
             {
                 argsWaitBefore = FuncParser.stringToInt(line.Remove(0, 3));
             }
         }
         arguments = null;
     }
     if (File.Exists(pathLauncherINI))
     {
         FuncParser.iniWrite(pathLauncherINI, "General", "Version_CP", panelFileVersion);
         int wLeft = FuncParser.intRead(pathLauncherINI, "General", "POS_WindowLeft");
         int wTop  = FuncParser.intRead(pathLauncherINI, "General", "POS_WindowTop");
         if (wLeft < 0 || wTop < 0)
         {
             StartPosition = FormStartPosition.CenterScreen;
         }
         else
         {
             if (wLeft > (Screen.PrimaryScreen.Bounds.Width - Size.Width))
             {
                 wLeft = Screen.PrimaryScreen.Bounds.Width - Size.Width;
             }
             if (wTop > (Screen.PrimaryScreen.Bounds.Height - Size.Height))
             {
                 wTop = Screen.PrimaryScreen.Bounds.Height - Size.Height;
             }
             StartPosition = FormStartPosition.Manual;
             Location      = new Point(wLeft, wTop);
         }
         settingsPreset = FuncParser.intRead(pathLauncherINI, "General", "SettingsPreset");
         if (settingsPreset < 0 || settingsPreset > 3)
         {
             settingsPreset = 2;
         }
         numberStyle = FuncParser.intRead(pathLauncherINI, "General", "NumberStyle");
         if (numberStyle < 1 || numberStyle > 2)
         {
             numberStyle = 1;
         }
         if (string.Equals(FuncParser.stringRead(pathLauncherINI, "General", "Language"), "EN", StringComparison.OrdinalIgnoreCase))
         {
             langTranslate = "EN";
             setLangTranslateEN();
         }
         else
         {
             setLangTranslateRU();
         }
         maxFPS = FuncParser.intRead(pathLauncherINI, "Game", "MaxFPS");
         if (maxFPS < 30 || maxFPS > 240)
         {
             maxFPS = 60;
         }
         if (!FuncParser.keyExists(pathLauncherINI, "Game", "ZFighting"))
         {
             FuncParser.iniWrite(pathLauncherINI, "Game", "ZFighting", "false");
         }
         int nearDistance = FuncParser.intRead(pathLauncherINI, "Game", "NearDistance");
         if (nearDistance < 15 || nearDistance > 25)
         {
             FuncParser.iniWrite(pathLauncherINI, "Game", "NearDistance", "18");
         }
         customFont = FuncParser.stringRead(pathLauncherINI, "Font", "CP_Font");
         if (customFont != null)
         {
             var ifc = new InstalledFontCollection();
             for (int i = ifc.Families.Length - 1; i >= 0; i--)
             {
                 if (ifc.Families[i].Name == customFont)
                 {
                     FuncMisc.supportStrikeOut(customFont);
                     FuncMisc.setFormFont(this);
                     break;
                 }
                 else if (i == 0)
                 {
                     customFont = null;
                 }
             }
             ifc = null;
         }
     }
     else
     {
         setLangTranslateRU();
         StartPosition = FormStartPosition.CenterScreen;
         closeControlPanel(this, new EventArgs());
     }
     if (!File.Exists(pathSkyrimPrefsINI) || !File.Exists(pathSkyrimINI))
     {
         resetSettings();
     }
     AppDomain.CurrentDomain.ProcessExit += new EventHandler(closeControlPanel);
     refreshStyle();
 }