Пример #1
0
        // Save ram button
        private void saverambutton_Click(object sender, EventArgs e)
        {
            if (comConnected == true && headerRead == true && commandReceived == 0)
            {
                progress = 0;
                backgroundWorker1.ReportProgress(0);

                if (alwaysAddDateTimeToSave == 1)
                {
                    saveAsNewFile    = true;
                    commandReceived  = SAVERAM;
                    statuslabel.Text = "Backing up Save...";
                }
                else
                {
                    saveAsNewFile = false;
                    if (Program.check_if_file_exists() == 1)
                    {
                        SaveOptions SaveOptionsForm = new SaveOptions();
                        SaveOptionsForm.ShowDialog();

                        if (commandReceived == SAVERAM)
                        {
                            statuslabel.Text = "Backing up Save...";
                        }
                        else
                        {
                            statuslabel.Text = "Backing up Save cancelled";
                        }
                    }
                    else
                    {
                        commandReceived  = SAVERAM;
                        statuslabel.Text = "Backing up Save...";
                    }
                }
            }
        }