コード例 #1
0
 //مسح الحافظة
 private void button2_Click(object sender, EventArgs e)
 {
     if (BackEnd.SessionInfo.Permissions[7].Equals('y'))
     {
         if (dataGridView1.Rows.Count == 0)
         {
             new frmDialog("لا يوجد حافظات لمسحها").ShowDialog();
             return;
         }
         int       theRow = dataGridView1.CurrentRow.Index;
         frmDialog dialog = new frmDialog("هل انت متأكد من رغبتك بمسح هذة الحافظة؟", true);
         dialog.ShowDialog();
         if (frmDialog.State)
         {
             foreach (DataGridViewRow Row in dataGridView1.SelectedRows)
             {
                 BackEnd.Pocket.Delete_Pocket(Row.Cells[0].Value.ToString());
             }
             //new frmDialog("تم مسح الحافظة").ShowDialog();
             Populate_Header_DGV();
             dataGridView1.ClearSelection();
             dataGridView2.DataSource = BackEnd.Pocket.Populate_Pocket_DGV("0");//عشان بعد السيليكشن تبان فاضية
         }
     }
     else
     {
         new frmDialog("لا توجد صلاحيات كافية").ShowDialog();
         return;;
     }
 }
コード例 #2
0
        private static void ShowErrorDialog(string message)
        {
            var confirmationForm = new frmDialog(message, "MessageBox", DialogType.OkOnly, 10);

            confirmationForm.ShowDialog();
            confirmationForm.Dispose();
        }
コード例 #3
0
        public static void showAdviseModal(string text)
        {
            frmFullScreen modal  = new frmFullScreen();
            frmDialog     dialog = new frmDialog(text, modal);

            modal.Show();
            dialog.ShowDialog();
        }
コード例 #4
0
        private void viewCodeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var currentCommand = _selectedTabScriptActions.SelectedItems[0].Tag;
            var jsonText       = JsonConvert.SerializeObject(currentCommand, new JsonSerializerSettings()
            {
                TypeNameHandling = TypeNameHandling.All
            });
            var dialog = new frmDialog(jsonText, "Command Code", DialogType.OkOnly, 0);

            dialog.ShowDialog();
        }
コード例 #5
0
        private void button4_Click(object sender, EventArgs e)
        {
            Button_Coloring("button4");
            frmDialog dialog = new frmDialog("هل انت متأكد من رغبتك فى الخروج؟", true);

            dialog.ShowDialog();
            if (frmDialog.State)
            {
                Application.Exit();
            }
        }
コード例 #6
0
    private void btnSetBase_Click(object sender, EventArgs e)
    {
        frmDialog    frmDialogInput = new frmDialog();
        DialogResult dResult        = frmDialogInput.ShowDialog(this);

        if (dResult == DialogResult.OK)
        {
            var digits = frmDialogInput.Base;
            lblOutDigits.Text = digits.ToString();
            CreateBaseButtons(digits);
        }
    }
コード例 #7
0
        private void DebugGridViewHelper_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            //if the column is 'Value'
            if (e.ColumnIndex == 2)
            {
                string debugName  = ((DataGridView)sender).Rows[e.RowIndex].Cells[0].Value.ToString();
                string debugValue = ((DataGridView)sender).Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();

                frmDialog debugDialog = new frmDialog(debugValue, debugName, DialogType.CancelOnly, 0);
                debugDialog.Show();
            }
        }
コード例 #8
0
 /// <summary>
 /// Used by the automation engine to show a message to the user on-screen. If UI is not available, a standard messagebox will be invoked instead.
 /// </summary>
 public void ShowMessage(string message, string title, DialogType dialogType, int closeAfter)
 {
     if (InvokeRequired)
     {
         var d = new ShowMessageDelegate(ShowMessage);
         Invoke(d, new object[] { message, title, dialogType, closeAfter });
     }
     else
     {
         var confirmationForm = new frmDialog(message, title, dialogType, closeAfter);
         confirmationForm.ShowDialog();
     }
 }
コード例 #9
0
ファイル: CaixaMensagem.cs プロジェクト: jalvarezbh/SINAF
        /// <summary>
        /// Mensagem com 3 opções de retorno
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static Dominio.Enumeradores.RespostaCaixaMensagem ExibirSimNaoCancelar(string msg)
        {
            frmDialog dialogo = Program.DialogForm <frmDialog>();

            Dominio.Enumeradores.RespostaCaixaMensagem retorno;
            dialogo.lblMensagem.Text = msg;
            dialogo.TopMost          = true;
            MostraCursor.CursorAguarde(false);
            dialogo.ShowDialog();
            retorno = dialogo.retorno;
            dialogo.Dispose();
            //Program.DialogFormClose();
            return(retorno);
        }
コード例 #10
0
    private void btnEdit_Click(object sender, EventArgs e)
    {
        //change code to get current row and check null, etc
        DataGridViewRow selectedRow = null;
        frmDialog       dlg         = new frmDialog(
            selectedRow.Cells[0].Value,
            selectedRow.Cells[1].Value);

        if (dlg.ShowDialog() == DialogResult.OK)
        {
            selectedRow.Cells[0].Value = dlg.Col1Value;
            selectedRow.Cells[1].Value = dlg.Col2Value;
            //...
        }
    }
コード例 #11
0
        private void runToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (IsScriptRunning)
            {
                return;
            }

            _isDebugMode = false;

            string fileExtension = Path.GetExtension(_scriptFilePath).ToLower();

            switch (fileExtension)
            {
            case ".obscript":
                RunOBScript();
                break;

            default:
                if (!SaveAllFiles())
                {
                    return;
                }
                try
                {
                    //arguments and outputs not yet implemented
                    switch (fileExtension)
                    {
                    case ".py":
                        ExecutionManager.RunPythonAutomation(_scriptFilePath, new object[] { });
                        break;

                    case ".tag":
                        ExecutionManager.RunTagUIAutomation(_scriptFilePath, ScriptProjectPath, new object[] { });
                        break;

                    case ".cs":
                        ExecutionManager.RunCSharpAutomation(_scriptFilePath, new object[] { null });
                        break;
                    }
                }
                catch (Exception ex)
                {
                    frmDialog errorMessageBox = new frmDialog(ex.Message, "Error", DialogType.OkOnly, 0);
                    errorMessageBox.ShowDialog();
                }
                break;
            }
        }
コード例 #12
0
ファイル: CaixaMensagem.cs プロジェクト: jalvarezbh/SINAF
        /// <summary>
        /// Mensagem com 1 opção de retorno e grava log de erro
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="erro"></param>
        /// <returns></returns>
        public static Dominio.Enumeradores.RespostaCaixaMensagem ExibirErro(string msg, string erro)
        {
            frmDialog dialogo = Program.DialogForm <frmDialog>();

            Dominio.Enumeradores.RespostaCaixaMensagem retorno;
            dialogo.butCancelar.Enabled = false;
            dialogo.butNao.Enabled      = false;
            dialogo.butSim.Text         = "Ok";
            dialogo.lblMensagem.Text    = msg;
            dialogo.TopMost             = true;
            MostraCursor.CursorAguarde(false);
            dialogo.ShowDialog();
            retorno = dialogo.retorno;
            dialogo.Dispose();
            //Program.DialogFormClose();
            LogErro.GravaLog(msg, erro);

            return(retorno);
        }
コード例 #13
0
    private void btnEdit_Click(object sender, EventArgs e)
    {
        //change code to get current row and check null, etc
        var sels = dataGridView1.SelectedRows;

        if (sels == null || sels.Count == 0)
        {
            return;
        }
        DataGridViewRow selRow = sels[0];
        frmDialog       dlg    = new frmDialog(
            selRow.Cells[0].Value,
            selRow.Cells[1].Value);

        if (dlg.ShowDialog() == DialogResult.OK)
        {
            selRow.Cells[0].Value = dlg.Col1Value;
            selRow.Cells[1].Value = dlg.Col2Value;
            //...
        }
    }
コード例 #14
0
 //مسح صف
 private void button4_Click(object sender, EventArgs e)
 {
     if (dataGridView2.Rows.Count > 0)
     {
         frmDialog dialog = new frmDialog("هل انت متأكد من رغبتك بحذف الرحلة المحددة؟", true);
         dialog.ShowDialog();
         if (frmDialog.State)
         {
             if (this.Text == "اضافة حافظة")
             {
                 int theRow = dataGridView2.CurrentRow.Index;
                 foreach (DataGridViewRow Row in dataGridView2.SelectedRows)
                 {
                     Pocket_Table.Rows.RemoveAt(Row.Index);
                     dataGridView2.DataSource = Pocket_Table;
                 }
             }
             if (this.Text == "تعديل حافظة")
             {
                 foreach (DataGridViewRow Row in dataGridView2.SelectedRows)
                 {
                     int theRow = dataGridView2.CurrentRow.Index;
                     Deleted_IDs.Add(Row.Cells[0].Value.ToString()); //خزن فى الاراي بتاعه المسح
                     Pocket_Edit_Datatable.Rows.RemoveAt(Row.Index);
                     dataGridView2.DataSource = Pocket_Edit_Datatable;
                 }
             }
         }
         Summing_Lables();
         M_Calculate();
     }
     else
     {
         new frmDialog("لا توجد رحلات").ShowDialog();
     }
 }
コード例 #15
0
        private async void frmScriptBuilder_LoadAsync(object sender, EventArgs e)
        {
            if (Debugger.IsAttached)
            {
                //set this value to 'true' to display the 'Install Default' button, and 'false' to hide it
                installDefaultToolStripMenuItem.Visible = true;
            }
            else //if OpenBots Studio is running in release mode
            {
                try
                {
                    //scan whether the current user account has unpacked default commands in their local appdata
                    await NugetPackageManager.SetupFirstTimeUserEnvironment();
                }
                catch (Exception ex)
                {
                    //packages missing from Program Files
                    MessageBox.Show($"{ex.Message}\n\nFirst time user environment setup failed.", "Error");
                }
            }

            var defaultTypesBinding = new BindingSource(_typeContext.DefaultTypes, null);

            VariableType.DataSource    = defaultTypesBinding;
            VariableType.DisplayMember = "Key";
            VariableType.ValueMember   = "Value";

            ArgumentType.DataSource    = defaultTypesBinding;
            ArgumentType.DisplayMember = "Key";
            ArgumentType.ValueMember   = "Value";

            //set controls double buffered
            foreach (Control control in Controls)
            {
                typeof(Control).InvokeMember("DoubleBuffered",
                                             BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                             null, control, new object[] { true });
            }

            //get app settings
            _appSettings = new ApplicationSettings();
            _appSettings = _appSettings.GetOrCreateApplicationSettings();

            _slimBarHeight  = tlpControls.RowStyles[0].Height;
            _thickBarHeight = tlpControls.RowStyles[1].Height;

            LoadActionBarPreference();

            //get scripts folder
            var rpaScriptsFolder = Folders.GetFolder(FolderType.ScriptsFolder);

            if (!Directory.Exists(rpaScriptsFolder))
            {
                frmDialog userDialog = new frmDialog("Would you like to create a folder to save your scripts in now? " +
                                                     "A script folder is required to save scripts generated with this application. " +
                                                     "The new script folder path would be '" + rpaScriptsFolder + "'.", "Unable to locate Script Folder!",
                                                     DialogType.YesNo, 0);

                if (userDialog.ShowDialog() == DialogResult.OK)
                {
                    Directory.CreateDirectory(rpaScriptsFolder);
                }

                userDialog.Dispose();
            }

            //get latest files for recent files list on load
            GenerateRecentProjects();

            //no height for status bar
            HideNotificationRow();

            //set listview column size
            frmScriptBuilder_SizeChanged(null, null);
            Refresh();
        }
コード例 #16
0
ファイル: edit.cs プロジェクト: rheehot/CSRouteTycoon
        public async void load()
        {
            this.Enabled = false;

            await Task.Delay(500);

            frmDialog fm       = new frmDialog();
            loading   _loading = new loading();

            PageManager.SetPage(fm._myPanel, _loading);
            _loading.StartAnimation();
            fm.Show();

            await Task.Delay(100);

            var hex = _loading;

            read.Clear();
            read2.Clear();
            dat.Clear();
            vals.Clear();
            _dat.Clear();
            _vals.Clear();

            //hex.myInfo = "컨트롤을 초기화 하는 중입니다...";
            //await Task.Delay(loadhex);
            foreach (Control it in Controls)
            {
                //hex.myInfo = "' " + it.Name + " ' 컨트롤을 초기화 하는 중입니다...";
                //await Task.Delay(loadhex);
                it.Font = new Font(FontManager.Get().EnvironmentFont, it.Font.Size, it.Font.Style);
                if (it is TabControl)
                {
                    TabControl t = it as TabControl;

                    foreach (TabPage p in t.TabPages)
                    {
                        foreach (Control c in p.Controls)
                        {
                            if (c is SplitContainer)
                            {
                                SplitContainer sp = c as SplitContainer;

                                foreach (Control its in sp.Panel1.Controls)
                                {
                                    //hex.myInfo = "' " + its.Name + " ' 컨트롤을 초기화 하는 중입니다...";
                                    //await Task.Delay(loadhex);
                                    its.Font = new Font(FontManager.Get().EnvironmentFont, its.Font.Size, its.Font.Style);
                                    if (its is ListView)
                                    {
                                        ListView lv = its as ListView;
                                        lv.MultiSelect = false;
                                    }
                                }

                                foreach (Control its2 in sp.Panel2.Controls)
                                {
                                    //hex.myInfo = "' " + its2.Name + " ' 컨트롤을 초기화 하는 중입니다...";
                                    //await Task.Delay(loadhex);
                                    its2.Font = new Font(FontManager.Get().EnvironmentFont, its2.Font.Size, its2.Font.Style);
                                    if (its2 is ListView)
                                    {
                                        ListView lv = its2 as ListView;
                                        lv.MultiSelect = false;
                                    }
                                }
                            }

                            //hex.myInfo = "' " + c.Name + " ' 컨트롤을 초기화 하는 중입니다...";
                            //await Task.Delay(loadhex);
                            c.Font = new Font(FontManager.Get().EnvironmentFont, c.Font.Size, c.Font.Style);
                        }
                    }
                }
            }

            switch (Properties.Settings.Default.imagesViewType)
            {
            case "LargeIcon": listView1.View = View.LargeIcon; listView2.View = View.LargeIcon; break;

            case "Details": listView1.View = View.Details; listView2.View = View.Details; break;

            case "List": listView1.View = View.List; listView2.View = View.List; break;

            case "SmallIcon": listView1.View = View.SmallIcon; listView2.View = View.SmallIcon; break;

            case "Tile": listView1.View = View.Tile; listView2.View = View.Tile; break;

            default: listView1.View = View.LargeIcon; listView2.View = View.LargeIcon; break;
            }

            switch (Properties.Settings.Default.soundViewType)
            {
            case "LargeIcon": listView3.View = View.LargeIcon; listView4.View = View.LargeIcon; break;

            case "Details": listView3.View = View.Details; listView4.View = View.Details; break;

            case "List": listView3.View = View.List; listView4.View = View.List; break;

            case "SmallIcon": listView3.View = View.SmallIcon; listView4.View = View.SmallIcon; break;

            case "Tile": listView3.View = View.Tile; listView4.View = View.Tile; break;

            default: listView3.View = View.LargeIcon; listView4.View = View.LargeIcon; break;
            }

            hex.myInfo = "프로젝트 정보를 가져오는 중 입니다...";
            await Task.Delay(loadhex);

            _path = Path.GetDirectoryName(path);
            int index = _path.LastIndexOf("\\");

            folder = _path.Substring(index + 1);

            hex.myInfo = "' " + _path + "\\" + folder + "\\data_res.dat" + " ' 데이터를 읽는 중 입니다...";
            await Task.Delay(loadhex);

            read       = File.ReadAllLines(_path + "\\" + folder + "\\data_res.dat", Encoding.Default).ToList();
            hex.myInfo = "' " + _path + "\\" + folder + "\\data_color.dat" + " ' 데이터를 읽는 중 입니다...";
            await Task.Delay(loadhex);

            read2 = File.ReadAllLines(_path + "\\" + folder + "\\data_color.dat", Encoding.Default).ToList();

            resname  = folder;
            resmaker = read[1];
            resinfo  = read[2];
            resver   = read[0];

            textBox1.Text  = resname;
            textBox2.Text  = resmaker;
            textBox3.Text  = resinfo;
            textBox10.Text = resver;

            listBox1.Items.Clear();
            listBox2.Items.Clear();

            hex.myInfo = "받아온 정보로 부터 데이터를 저장 중 입니다...";
            await Task.Delay(loadhex);

            foreach (string item in read2)
            {
                if (string.IsNullOrEmpty(item))
                {
                    continue;
                }
                if (item[0] == '/' && item[1] == '/')
                {
                    continue;
                }

                if (item[0] == '$')
                {
                    string node = Regex.Split(item, ":")[0];
                    string val  = Regex.Split(item, ":")[1];

                    //hex.myInfo = "' " + node + " ' 값을 저장하는 중 입니다...";
                    //await Task.Delay(loadhex);
                    vals.Add(node);
                    //hex.myInfo = "' " + val + " ' 값을 저장하는 중 입니다...";
                    //await Task.Delay(loadhex);
                    _vals.Add(node, val);

                    //hex.myInfo = "' " + listBox2.Name + " ' 컨트롤을 초기화 하는 중 입니다...";
                    //await Task.Delay(loadhex);
                    listBox2.Items.Add(node);

                    continue;
                }

                string node2 = Regex.Split(item, "=")[0];
                string val2  = Regex.Split(item, "=")[1];

                //hex.myInfo = "' " + node2 + " ' 값을 저장하는 중 입니다...";
                //await Task.Delay(loadhex);
                dat.Add(node2);
                //hex.myInfo = "' " + val2 + " ' 값을 저장하는 중 입니다...";
                //await Task.Delay(loadhex);
                _dat.Add(node2, val2);

                //hex.myInfo = "' " + listBox1.Name + " ' 컨트롤을 초기화 하는 중 입니다...";
                //await Task.Delay(loadhex);
                listBox1.Items.Add(node2);
            }

            hex.myInfo = "솔루션 파일을 읽는 중 입니다...";
            await Task.Delay(loadhex);

            string line = string.Empty;;

            if (!File.Exists((_path + "\\" + folder + ".rts")))
            {
                createrts();
            }
            using (StreamReader sr2 = new StreamReader(_path + "\\" + folder + ".rts", Encoding.Default))
            {
                while ((line = sr2.ReadLine()) != null)
                {
                    //hex.myInfo = "' " + line + " ' 값을 읽는 중 입니다...";
                    //await Task.Delay(loadhex);
                    rts_read.Add(line);
                    if (Regex.Split(line, "=")[0].Equals("imageloc"))
                    {
                        imageloc = Regex.Split(line, "=")[1];
                    }
                    if (Regex.Split(line, "=")[0].Equals("soundloc"))
                    {
                        soundloc = Regex.Split(line, "=")[1];
                    }
                }
            }

            textBox13.Text = imageloc;
            hex.myInfo     = "' " + imageloc + " ' 로 부터 이미지를 읽는 중 입니다...";
            await Task.Delay(loadhex);

            loadimagesfromloc();
            hex.myInfo = "NPK 파일로 부터 이미지를 읽는 중 입니다...";
            await Task.Delay(loadhex);

            loadimagesfromnpk();

            textBox16.Text = soundloc;
            hex.myInfo     = "' " + soundloc + " ' 로 부터 사운드를 읽는 중 입니다...";
            await Task.Delay(loadhex);

            imageList3.Images.Clear();
            imageList3.Images.Add(Properties.Resources.music_file);
            loadsoundsfromloc();
            hex.myInfo = "NPK 파일로 부터 사운드를 읽는 중 입니다...";
            await Task.Delay(loadhex);

            loadsoundsfromnpk();

            if (Properties.Settings.Default.useAutoSave)
            {
                autoSave();
                hex.myInfo = "자동 저장 기능을 활성화 합니다...";
                await Task.Delay(loadhex);
            }

            hex.myInfo = "데이터를 저장하는 중 입니다...";
            await Task.Delay(loadhex);

            TempData.UIData._edit_set = this;
            TempData.UIData.Init();

            hex.myInfo = "프로젝트 로딩 작업이 모두 완료 되었습니다.";
            await Task.Delay(200);

            this.Enabled = true;
            fm.Close();
        }
コード例 #17
0
        public static void showAdvise(string text)
        {
            frmDialog dialog = new frmDialog(text);

            dialog.ShowDialog();
        }
コード例 #18
0
        private void cboSelectedCommand_SelectionChangeCommitted(object sender, EventArgs e)
        {
            //clear controls
            flw_InputVariables.Controls.Clear();

            //find underlying command item
            var selectedCommandItem = cboSelectedCommand.Text;

            //get command
            var userSelectedCommand = CommandList.Where(itm => itm.FullName == selectedCommandItem).FirstOrDefault();

            //create new command for binding
            SelectedCommand             = (ScriptCommand)Activator.CreateInstance(userSelectedCommand.CommandClass);
            SelectedCommand.CommandIcon = null;
            //Todo: MAKE OPTION TO RENDER ON THE FLY

            //if (true)
            //{
            //    var renderedControls = selectedCommand.Render(null);
            //    userSelectedCommand.UIControls = new List<Control>();
            //    userSelectedCommand.UIControls.AddRange(renderedControls);
            //}

            //update data source
            userSelectedCommand.Command = SelectedCommand;

            //copy original properties
            if (OriginalCommand != null)
            {
                CopyPropertiesTo(OriginalCommand, SelectedCommand);
            }

            try
            {
                //bind controls to new data source
                userSelectedCommand.Bind(this, _commandControls);
            }
            catch (Exception ex)
            {
                frmDialog errorForm = new frmDialog(ex.Message, ex.GetType()?.ToString(), DialogType.CancelOnly, 0);;
                errorForm.ShowDialog();
            }

            Label descriptionLabel = new Label();

            descriptionLabel.AutoSize  = true;
            descriptionLabel.Font      = new Font("Segoe UI", 12);
            descriptionLabel.ForeColor = Color.White;
            descriptionLabel.Name      = "lbl_" + userSelectedCommand.ShortName;
            descriptionLabel.Text      = userSelectedCommand.Description;
            descriptionLabel.Padding   = new Padding(0, 0, 0, 5);
            flw_InputVariables.Controls.Add(descriptionLabel);

            Label separator = new Label();

            separator.AutoSize    = false;
            separator.Height      = 2;
            separator.BorderStyle = BorderStyle.Fixed3D;
            flw_InputVariables.Controls.Add(separator);

            //add each control
            foreach (var ctrl in userSelectedCommand.UIControls)
            {
                flw_InputVariables.Controls.Add(ctrl);
            }

            OnResize(EventArgs.Empty);
            SelectedCommand.Shown();
        }
コード例 #19
0
        private void frmScriptBuilder_Load(object sender, EventArgs e)
        {
            //load all commands
            _automationCommands = UIControlsHelper.GenerateCommandsandControls();

            //set controls double buffered
            foreach (Control control in Controls)
            {
                typeof(Control).InvokeMember("DoubleBuffered",
                                             BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                                             null, control, new object[] { true });
            }

            //get app settings
            _appSettings = new ApplicationSettings();
            _appSettings = _appSettings.GetOrCreateApplicationSettings();

            string clientLoggerFilePath   = Path.Combine(Folders.GetFolder(FolderType.LogFolder), "OpenBots Automation Client Logs.txt");
            Logger automationClientLogger = new Logging().CreateFileLogger(clientLoggerFilePath, Serilog.RollingInterval.Day);

            //Core.Sockets.SocketClient.Initialize();
            //Core.Sockets.SocketClient.associatedBuilder = this;

            //handle action bar preference
            //hide action panel

            if (_editMode)
            {
                tlpControls.RowStyles[0].SizeType = SizeType.Absolute;
                tlpControls.RowStyles[0].Height   = 0;

                tlpControls.RowStyles[1].SizeType = SizeType.Absolute;
                tlpControls.RowStyles[1].Height   = 81;
            }
            else if (_appSettings.ClientSettings.UseSlimActionBar)
            {
                tlpControls.RowStyles[1].SizeType = SizeType.Absolute;
                tlpControls.RowStyles[1].Height   = 0;
            }
            else
            {
                tlpControls.RowStyles[0].SizeType = SizeType.Absolute;
                tlpControls.RowStyles[0].Height   = 0;
            }

            //get scripts folder
            var rpaScriptsFolder = Folders.GetFolder(FolderType.ScriptsFolder);

            if (!Directory.Exists(rpaScriptsFolder))
            {
                frmDialog userDialog = new frmDialog("Would you like to create a folder to save your scripts in now? " +
                                                     "A script folder is required to save scripts generated with this application. " +
                                                     "The new script folder path would be '" + rpaScriptsFolder + "'.", "Unable to locate Script Folder!",
                                                     DialogType.YesNo, 0);

                if (userDialog.ShowDialog() == DialogResult.OK)
                {
                    Directory.CreateDirectory(rpaScriptsFolder);
                }
            }

            //get latest files for recent files list on load
            GenerateRecentFiles();

            //no height for status bar
            HideNotificationRow();

            //instantiate for script variables
            if (!_editMode)
            {
                _scriptVariables = new List <ScriptVariable>();
                _scriptElements  = new List <ScriptElement>();
            }
            //pnlHeader.BackColor = Color.FromArgb(255, 214, 88);

            //instantiate and populate display icons for commands
            _uiImages = UIImage.UIImageList();

            //set image list
            _selectedTabScriptActions.SmallImageList = _uiImages;

            //set listview column size
            frmScriptBuilder_SizeChanged(null, null);

            var groupedCommands = _automationCommands.GroupBy(f => f.DisplayGroup);

            foreach (var cmd in groupedCommands)
            {
                TreeNode newGroup = new TreeNode(cmd.Key);

                foreach (var subcmd in cmd)
                {
                    TreeNode subNode = new TreeNode(subcmd.ShortName);
                    subNode.ToolTipText = subcmd.Description;
                    newGroup.Nodes.Add(subNode);
                }

                tvCommands.Nodes.Add(newGroup);
            }

            tvCommands.Sort();
            //tvCommands.ImageList = uiImages;

            _tvCommandsCopy = new TreeView();
            _tvCommandsCopy.ShowNodeToolTips = true;
            CopyTreeView(tvCommands, _tvCommandsCopy);
            txtCommandSearch.Text = _txtCommandWatermark;

            //start attended mode if selected
            if (_appSettings.ClientSettings.StartupMode == "Attended Task Mode")
            {
                WindowState = FormWindowState.Minimized;
                var frmAttended = new frmAttendedMode(ScriptProjectPath);
                frmAttended.Show();
            }
        }