Пример #1
0
 /// <summary>
 /// Creates an instance of the dialog for modifying a given RenderWare version.
 /// Once this is executed, run <see cref="ShowDialog"/>.
 /// </summary>
 /// <param name="renderWareVersion">The RenderWare version entry to modify.</param>
 public RWVersionDialog(RWVersion renderWareVersion)
 {
     InitializeComponent();
     RenderWareVersion = renderWareVersion;
     ApplyTheme.ThemeWindowsForm(this);
     MakeRoundedWindow.RoundWindow(this, 30, 30);
 }
 /// <summary>
 /// Creates an instance of the dialog for modifying the value of a single
 /// integer used to specify search buffer size.
 /// </summary>
 /// <param name="initialInteger">The singular integer value to modify.</param>
 public ChangeCompressionRateDialog(int initialInteger)
 {
     InitializeComponent();
     integerToManipulate = initialInteger;
     ApplyTheme.ThemeWindowsForm(this);
     MakeRoundedWindow.RoundWindow(this, 30, 30);
 }
Пример #3
0
 /// <summary>
 /// Creates an instance of the dialog for modifying the value of a single
 /// integer used to specify search buffer size.
 /// </summary>
 /// <param name="name">Specifies the initial name for the dialog..</param>
 public RenameDialog(string name)
 {
     InitializeComponent();
     localName = name;
     ApplyTheme.ThemeWindowsForm(this);
     MakeRoundedWindow.RoundWindow(this, 30, 30);
 }
        /// <summary>
        /// Initializes the form.
        /// </summary>
        /// <param name="initialValue">The initial value for the user to see.</param>
        public GetDestinationAxisDialog(string initialValue)
        {
            // Standard WinForms Init
            InitializeComponent();

            // Populate items in box with available axes from code.
            foreach (ControllerCommon.ControllerAxis controllerAxes in Enum.GetValues(typeof(ControllerCommon.ControllerAxis)))
            {
                borderless_ValueBox.Items.Add(controllerAxes.ToString());
            }

            // Find initial value by matching strings.
            for (int x = 0; x < borderless_ValueBox.Items.Count; x++)
            {
                // Grab ComboBox value at index x
                string value = borderless_ValueBox.GetItemText(borderless_ValueBox.Items[x]);

                // If matches, select and exit.
                if (value == initialValue)
                {
                    borderless_ValueBox.SelectedIndex = x; break;
                }
            }

            // Select ComboBox
            borderless_ValueBox.Select();

            // Make the form rounded.
            MakeRoundedWindow.RoundWindow(this, 30, 30);
        }
Пример #5
0
        /// <summary>
        /// Initializes the form.
        /// </summary>
        public DialogSample()
        {
            // Standard WinForms Init
            InitializeComponent();

            // Make the form rounded.
            MakeRoundedWindow.RoundWindow(this, 30, 30);
        }
Пример #6
0
        /// <summary>
        /// Initializes the form.
        /// </summary>
        public WelcomeScreen()
        {
            // Standard WinForms Init
            InitializeComponent();

            // Make the form rounded.
            MakeRoundedWindow.RoundWindow(this, 30, 30);
        }
Пример #7
0
        /// <summary>
        /// Initializes the form.
        /// </summary>
        /// <param name="disabledConfigs">The list of individual disabled mod configurations.</param>
        public EnabledDependencyDialog(List <ModConfig> disabledConfigs)
        {
            // Standard WinForms Init
            InitializeComponent();

            // Make the form rounded.
            MakeRoundedWindow.RoundWindow(this, 30, 30);

            // Set the disabled dependency text.
            this.borderless_EnabledDependencies.Text = string.Join("\n", disabledConfigs.Select(x => x.ModName + " | " + x.ModId));
        }
Пример #8
0
        /* Themes the current Windows Form.*/
        private void MainForm_Load(object sender, EventArgs e)
        {
            // Theme this form.
            _reloadedDefaultTheme = new Theme();
            Reloaded_GUI.Bindings.WindowsForms.Add(this);
            _reloadedDefaultTheme.LoadCurrentTheme();

            // Custom render settings.
            MakeRoundedWindow.RoundWindow(this, 30, 30);
            categoryBar_MenuStrip.Renderer = new MyRenderer();
        }
        /// <summary>
        /// Initializes the form.
        /// </summary>
        public GetNumberDialog()
        {
            // Standard WinForms Init
            InitializeComponent();

            // Select textbox
            borderless_ValueBox.Select();

            // Make the form rounded.
            MakeRoundedWindow.RoundWindow(this, 30, 30);
        }
Пример #10
0
 private void Base_Load(object sender, EventArgs e)
 {
     // Load the global theme if not loaded.
     if (String.IsNullOrEmpty(Global.Theme.ThemeDirectory))
     {
         Global.Theme.ThemeDirectory = Global.LoaderConfiguration.CurrentTheme;
     }
     MakeRoundedWindow.RoundWindow(this, 30, 30);
     ApplyTheme.ThemeWindowsForm(this);
     PopulateList();
 }
        /// <summary>
        /// Initializes the form.
        /// </summary>
        /// <param name="githubUpdateManager">An instance of already initialized and awaited GithubUpdateManager from Squirrel.Windows</param>
        /// <param name="githubUpdateInfo">Contains an instance of pre-acquired Github update information.</param>
        public DownloadUpdatesDialog(UpdateManager githubUpdateManager, ref UpdateInfo githubUpdateInfo)
        {
            // Standard WinForms Init
            InitializeComponent();

            // Make the form rounded.
            MakeRoundedWindow.RoundWindow(this, 30, 30);

            // Set the GithubManager
            _githubUpdateManager = githubUpdateManager;
            _githubUpdateInfo    = githubUpdateInfo;
        }
Пример #12
0
        /// <summary>
        /// Initializes the form.
        /// </summary>
        /// <param name="initialValue">The initial value for the user to see.</param>
        public GetNumberDialog(float initialValue)
        {
            // Standard WinForms Init
            InitializeComponent();

            // Set initial value.
            borderless_ValueBox.Text = Convert.ToString(initialValue, CultureInfo.InvariantCulture);
            borderless_ValueBox.Select();

            // Make the form rounded.
            MakeRoundedWindow.RoundWindow(this, 30, 30);
        }
Пример #13
0
        /// <summary>
        /// Initializes the form.
        /// </summary>
        /// <param name="modDownloadUrl">Specifies the URL of the mod to be downloaded.</param>
        public DownloadModDialog(string modDownloadUrl)
        {
            // Standard WinForms Init
            InitializeComponent();
            _updateSources = PluginLoader.UpdateSourcePlugins;
            MakeRoundedWindow.RoundWindow(this, 30, 30);
            _modificationUrl = modDownloadUrl;

            // Strip the Reloaded Link Specifier (if necessary) | reloaded:
            if (_modificationUrl.StartsWith(Strings.Launcher.ReloadedProtocolName, true, CultureInfo.InvariantCulture))
            {
                _modificationUrl = Regex.Replace(_modificationUrl, "reloaded:", "", RegexOptions.IgnoreCase);
            }
        }
Пример #14
0
        /// <summary>
        /// Sets up the current window and the Reloaded theme.
        /// </summary>
        /// <param name="openFile">Specifies the file to open on launch, if any.</param>
        public MainWindow(string openFile = "")
        {
            InitializeComponent();

            ReloadedDefaultTheme = new Theme();
            Reloaded_GUI.Bindings.WindowsForms.Add(this);
            //Load Reloaded-GUI
            ReloadedDefaultTheme.LoadCurrentTheme();

            // Custom render settings.
            MakeRoundedWindow.RoundWindow(this, 30, 30);
            categoryBar_MenuStrip.Renderer = new MyRenderer();

            // Initialize default archive.
            if (openFile != "")
            {
                try
                {
                    // Attempt to load the file from disk, parse the .ONE archive and update the GUI.
                    byte[] file = File.ReadAllBytes(openFile);
                    Archive = Archive.FromONEFile(ref file);
                    UpdateGUI(ref Archive);
                    this.titleBar_Title.Text = Path.GetFileName(openFile);
                    SetCheckboxHint(ref file);

                    // Conditionally display Shadow the Edgehog warning.
                    CheckShadowWarning(ref file);
                    _lastOpenedDirectory = Path.GetDirectoryName(openFile);
                    _lastONEDirectory    = Path.GetDirectoryName(openFile);
                    // If this throws, or there is no file, an empty file is loaded instead.
                }
                catch { Archive = new Archive(CommonRWVersions.Heroes); }
            }
            else
            {
                Archive = new Archive(CommonRWVersions.Heroes);
            }
        }