Exemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Editor.TodoEditorClient client = null;
            if (tableName.Text == "")
            {
                MessageBox.Show("Please, input tablename");
                return;
            }
            try
            {
                client = new Editor.TodoEditorClient("NetTcpBinding_ITodoEditor");
                client.InnerChannel.Closed  += InnerChannel_Closed;
                client.InnerChannel.Faulted += InnerChannel_Closed;
                client.InitializeList(tableName.Text);
            }
            catch (Exception)
            {
                MessageBox.Show("Can't connect");
                return;
            }
            MainWindow main = new MainWindow(client, tableName.Text);

            main.Show();
            Close();
        }
Exemplo n.º 2
0
 public TaskWindow(Editor.TodoEditorClient client)
 {
     InitializeComponent();
     Client = client;
     Client.InnerChannel.Closed  += InnerChannel_Closed;
     Client.InnerChannel.Faulted += InnerChannel_Closed;
 }
Exemplo n.º 3
0
 public MainWindow(Editor.TodoEditorClient client, string tableName)
 {
     InitializeComponent();
     Client = client;
     Client.InnerChannel.Closed  += InnerChannel_Closed;
     Client.InnerChannel.Faulted += InnerChannel_Closed;
     Client.InnerChannel.Closing += InnerChannel_Closed;
     TableName = tableName;
     UpdateList();
 }
Exemplo n.º 4
0
        public TaskWindow(Editor.TodoEditorClient client, Task task)
        {
            InitializeComponent();
            Client              = client;
            titleBox.Text       = task.Title;
            descriptionBox.Text = task.Description;
            deadlinePicker.Text = task.Deadline.ToString();
            StringBuilder builder = new StringBuilder();

            foreach (string tag in task.Tags)
            {
                builder.Append($"{tag} ");
            }
            builder.Remove(builder.Length - 1, 1);
            tagsBox.Text = builder.ToString();
        }