Exemplo n.º 1
0
 public void ChangeWindowStateShowNew(Object sender, EventArgs args)
 {
     this.windowState = CustomWindowState.SHOW;
     this.currentTodo = Data.Todo.GetLatest();
     this.newTodo     = true;
     BuildFromState();
 }
Exemplo n.º 2
0
 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();
     }
 }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
 public void ChangeWindowStateCreate(Object sender, EventArgs args)
 {
     this.windowState = CustomWindowState.CREATE;
     BuildFromState();
 }
Exemplo n.º 5
0
 public void ChangeWindowStateEdit(Object sender, EventArgs args)
 {
     this.windowState = CustomWindowState.EDIT;
     BuildFromState();
 }