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();
        }
 public TaskWindow(Editor.TodoEditorClient client)
 {
     InitializeComponent();
     Client = client;
     Client.InnerChannel.Closed  += InnerChannel_Closed;
     Client.InnerChannel.Faulted += InnerChannel_Closed;
 }
 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();
 }
        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();
        }