Exemplo n.º 1
0
        //----< define how to process each message command >-------------

        void initializeMessageDispatcher()
        {
            // load remoteFiles listbox with files from root

            messageDispatcher["getTopFiles"] = (CommMessage msg) =>
            {
                remoteFiles.Items.Clear();
                foreach (string file in msg.arguments)
                {
                    remoteFiles.Items.Add(file);
                }
            };
            // load remoteDirs listbox with dirs from root

            messageDispatcher["getTopDirs"] = (CommMessage msg) =>
            {
                remoteDirs.Items.Clear();
                foreach (string dir in msg.arguments)
                {
                    remoteDirs.Items.Add(dir);
                }
            };
            // load remoteFiles listbox with files from folder

            messageDispatcher["moveIntoFolderFiles"] = (CommMessage msg) =>
            {
                remoteFiles.Items.Clear();
                foreach (string file in msg.arguments)
                {
                    remoteFiles.Items.Add(file);
                }
            };
            // load remoteDirs listbox with dirs from folder

            messageDispatcher["moveIntoFolderDirs"] = (CommMessage msg) =>
            {
                remoteDirs.Items.Clear();
                foreach (string dir in msg.arguments)
                {
                    remoteDirs.Items.Add(dir);
                }
            };

            messageDispatcher["moveUpDirs"] = (CommMessage msg) =>
            {
                remoteDirs.Items.Clear();
                foreach (string dir in msg.arguments)
                {
                    remoteDirs.Items.Add(dir);
                }
            };

            messageDispatcher["moveUpDirsFile"] = (CommMessage msg) =>
            {
                remoteFiles.Items.Clear();
                foreach (string files in msg.arguments)
                {
                    remoteFiles.Items.Add(files);
                }
            };

            messageDispatcher["moveSelectedFiles"] = (CommMessage msg) =>
            {
                File_sets.Items.Clear();
                foreach (var item in msg.arguments)
                {
                    File_sets.Items.Add(item);
                }
            };

            messageDispatcher["Add_all"] = (CommMessage msg) =>
            {
                File_sets.Items.Clear();
                foreach (var item in msg.arguments)
                {
                    File_sets.Items.Add(item);
                }
            };

            messageDispatcher["importone"] = (CommMessage msg) =>
            {
                File_sets.Items.Clear();
                foreach (var item in msg.arguments)
                {
                    File_sets.Items.Add(item);
                }
            };

            messageDispatcher["importall"] = (CommMessage msg) =>
            {
                File_sets.Items.Clear();
                foreach (var item in msg.arguments)
                {
                    File_sets.Items.Add(item);
                }
            };

            messageDispatcher["removeSelectedFiles"] = (CommMessage msg) =>
            {
                File_sets.Items.Clear();
                foreach (var item in msg.arguments)
                {
                    File_sets.Items.Add(item);
                }
            };

            messageDispatcher["clearSelectedFiles"] = (CommMessage msg) =>
            {
                File_sets.Items.Clear();
            };

            messageDispatcher["Generate_TT"] = (CommMessage msg) =>
            {
                //Result1.Items.Clear();
                Result1.Clear();
                foreach (var item in msg.arguments)
                {
                    Result1.AppendText(item);
                    //Result1.Items.Add(item);
                }
            };

            messageDispatcher["Generate_DT"] = (CommMessage msg) =>
            {
                //Result1.Items.Clear();
                Result1.Clear();
                foreach (var item in msg.arguments)
                {
                    Result1.AppendText(item);
                    //Result1.Items.Add(item);
                }
            };

            messageDispatcher["Generate_SC"] = (CommMessage msg) =>
            {
                //Result1.Items.Clear();
                Result1.Clear();
                foreach (var item in msg.arguments)
                {
                    Result1.AppendText(item);
                    //Result1.Items.Add(item);
                }
            };
        }
Exemplo n.º 2
0
 private void Button18_Click(object sender, EventArgs e)
 {
     Result1.Clear();
 }