public void ChangeWindowStateShowNew(Object sender, EventArgs args) { this.windowState = CustomWindowState.SHOW; this.currentTodo = Data.Todo.GetLatest(); this.newTodo = true; BuildFromState(); }
public void ChangeWindowStateShow(Object sender, EventArgs args) { if (currentTodo != null) { this.windowState = CustomWindowState.SHOW; this.currentTodo = Data.Todo.GetById(currentTodo.TodoID); BuildFromState(); } else { this.Close(); } }
public TodoWindow(int?id) { InitializeComponent(); Owner = Application.Current.MainWindow; WindowStartupLocation = WindowStartupLocation.CenterOwner; this.Left += Owner.Width; if (id == null) { this.windowState = CustomWindowState.CREATE; } else { this.currentTodo = Data.Todo.GetById((int)id); } this.todoUC.lblNew.Foreground = new SolidColorBrush(Colors.Green); this.BuildFromState(); }
public void ChangeWindowStateCreate(Object sender, EventArgs args) { this.windowState = CustomWindowState.CREATE; BuildFromState(); }
public void ChangeWindowStateEdit(Object sender, EventArgs args) { this.windowState = CustomWindowState.EDIT; BuildFromState(); }