Esempio n. 1
0
        // CALLBACKS FOR FIRST PART
        public void AddAccessory(object layerButton, EventArgs args)
        {
            try
            {
                ToolButton btn = layerButton as ToolButton;
                Image      img = new Image("./accessories/" + btn.Label + ".png");
                _model.AddLayer(img.Pixbuf, btn.Label);
                _listView.Selected = _model.NumLayers - 1;
            }
            catch (Exception e)
            {
                MessageDialog md =
                    new MessageDialog(this,
                                      DialogFlags.DestroyWithParent,
                                      MessageType.Error,
                                      ButtonsType.Close, "Scale size out of bounds!");

                int result = md.Run();
                md.Destroy();
            }
        }
Esempio n. 2
0
 void OnStarClick(object sender, EventArgs args)
 {
     _cm.AddLayer(new Gdk.Pixbuf("/Users/eliaanagnostou/Documents/cs71/03-photobooth-eanagno1-zbatool1/accessories/star.png"), "star");
 }
Esempio n. 3
0
 //requires: the accessory image and the image name
 //effects: triggers AddLayer of the CompositeModel
 void OnAccessoryCallback(Gdk.Pixbuf accessoryImage, string accessoryName)
 {
     _model.AddLayer(accessoryImage, accessoryName);
 }