private void btnNew_Click(object sender, RoutedEventArgs e)
 {
     ComputeNode compute_node = new ComputeNode();
     ComputeNodeConfig config = new ComputeNodeConfig(compute_node);
     config.Show();
     Close();
 }
Beispiel #2
0
        /// <summary>
        /// open from the storage interface
        /// </summary>
        /// <param name="storage"></param>
        private void OpenStorage(IStorageAccess storage)
        {
            //open file dialog
            string PathName;
            string FileName;

            if (!storage.OpenFileDialog(out PathName, out FileName))
            {
                return;
            }

            //read the file
            string data;

            if (!storage.ReadFile(PathName, FileName, out data))
            {
                MessageBox.Show("There was an error reading the file.");
                return;
            }
            //create the compute node and window
            IComputeNode      compute_node = new ComputeNode().DeserializeComputeNode(data);
            ComputeNodeConfig dlg          = new ComputeNodeConfig(compute_node);

            dlg.Show();
            Close();
        }
Beispiel #3
0
        private void btnNew_Click(object sender, RoutedEventArgs e)
        {
            ComputeNode       compute_node = new ComputeNode();
            ComputeNodeConfig config       = new ComputeNodeConfig(compute_node);

            config.Show();
            Close();
        }
Beispiel #4
0
        /// <summary>
        /// open from the storage interface
        /// </summary>
        /// <param name="storage"></param>
        private void OpenStorage(IStorageAccess storage)
        {
            //open file dialog
            string PathName;
            string FileName;
            if (!storage.OpenFileDialog(out PathName, out FileName))
                return;

            //read the file
            string data;
            if (!storage.ReadFile(PathName, FileName, out data))
            {
                MessageBox.Show("There was an error reading the file.");
                return;
            }
            //create the compute node and window
            IComputeNode compute_node = new ComputeNode().DeserializeComputeNode(data);
            ComputeNodeConfig dlg = new ComputeNodeConfig(compute_node);
            dlg.Show();
            Close();
        }