Ejemplo n.º 1
0
        void ReleaseDesignerOutlets()
        {
            if (CompanyImage != null)
            {
                CompanyImage.Dispose();
                CompanyImage = null;
            }

            if (PubDescription != null)
            {
                PubDescription.Dispose();
                PubDescription = null;
            }

            if (PubTitle != null)
            {
                PubTitle.Dispose();
                PubTitle = null;
            }

            if (ScrollView != null)
            {
                ScrollView.Dispose();
                ScrollView = null;
            }

            if (ButtonApply != null)
            {
                ButtonApply.Dispose();
                ButtonApply = null;
            }
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            var db      = DatabaseHelper.Instance.Connection;
            var company = db.Table <Company> ().Where(c => c.Name.Equals(_publication.Company)).First();

            Title                   = _publication.Title;
            PubTitle.Text           = _publication.Title;
            PubTitle.TextAlignment  = UITextAlignment.Center;
            CompanyImage.Image      = UIImage.FromFile(company.IconPath);
            PubDescription.Editable = false;
            PubDescription.Text     = _publication.FullDescription;
            ButtonApply.SetTitle("Apply".t(), UIControlState.Normal);
            ButtonApply.BackgroundColor = UIColor.FromRGB(135, 135, 135);
            ButtonApply.TouchUpInside  += (sender, e) => {
                new UIAlertView("Touch2", "TouchUpInside handled", null, "OK", null).Show();
            };

            // Perform any additional setup after loading the view, typically from a nib.
        }
Ejemplo n.º 3
0
 private void ApplyButton_ButtonClick()
 {
     ButtonApply?.Invoke();
 }
Ejemplo n.º 4
0
        private void LayerPropertiesForm_Load(object sender, EventArgs e)
        {
            if (SourceForm.TextureTypes.Count == 0)
            {
                TextureMode.Parent = groupBox3; TextureMode.Location = new Point(TileHeight.Location.X, LimitVisibleRegion.Location.Y); ClientSize = new Size(ClientSize.Width, ClientSize.Height - (groupBox4.Bottom - groupBox3.Bottom));
            }
            else if (SourceForm.TextureTypes.Count == 1)
            {
                TextureModeSelect.Visible = false;
                foreach (Control foo in new Control[] { Param1, Param2, Param3, RedLabel, GreenLabel, BlueLabel, Stars, ColorBox, ColorLabel })
                {
                    foo.Location = new Point(foo.Location.X, foo.Location.Y - TextureModeSelect.Height);
                }

                /*Param1.Location = new Point(Param1.Location.X, Param1.Location.Y - TextureModeSelect.Height);
                 * Param2.Location = new Point(Param2.Location.X, Param2.Location.Y - TextureModeSelect.Height);
                 * Param3.Location = new Point(Param3.Location.X, Param3.Location.Y - TextureModeSelect.Height);
                 * RedLabel.Location = new Point(RedLabel.Location.X, RedLabel.Location.Y - TextureModeSelect.Height);
                 * GreenLabel.Location = new Point(GreenLabel.Location.X, GreenLabel.Location.Y - TextureModeSelect.Height);
                 * BlueLabel.Location = new Point(BlueLabel.Location.X, BlueLabel.Location.Y - TextureModeSelect.Height);
                 * Stars.Location = new Point(Stars.Location.X, Stars.Location.Y - TextureModeSelect.Height);
                 * ColorBox.Location = new Point(ColorBox.Location.X, ColorBox.Location.Y - TextureModeSelect.Height);
                 * ColorLabel.Location = new Point(ColorLabel.Location.X, ColorLabel.Location.Y - TextureModeSelect.Height);*/
                if (SourceForm.TextureTypes[0][1] == "+")
                {
                    groupBox4.Height -= TextureModeSelect.Height + (Param3.Location.Y - Param1.Location.Y);
                    Height           -= TextureModeSelect.Height + (Param3.Location.Y - Param1.Location.Y);
                }
                else
                {
                    groupBox4.Height -= TextureModeSelect.Height;
                    Height           -= TextureModeSelect.Height;
                }
            }
            if (!SourceForm.EnableableBools[SourceForm.J2L.VersionType][EnableableTitles.BoolDevelopingForPlus])
            {
                groupBoxPlus.Hide();
                var amountToShrinkWindow = groupBox3.Location.Y - groupBoxPlus.Location.Y;
                groupBox3.Location = new Point(groupBox3.Location.X, groupBox3.Location.Y - amountToShrinkWindow);
                groupBox4.Location = new Point(groupBox4.Location.X, groupBox4.Location.Y - amountToShrinkWindow);
                Height            -= amountToShrinkWindow;
            }
            TextureModeSelect.Items.Clear();
            for (ushort i = 0; i < SourceForm.TextureTypes.Count; i++)
            {
                TextureModeSelect.Items.Add(SourceForm.TextureTypes[i][0].Trim());
            }
            if (!ShowLayerSelection)
            {
                ButtonApply.Hide();
                groupBox1.Hide();
                var amountToShrinkWindow = groupBox2.Location.Y - groupBox1.Location.Y;
                foreach (GroupBox foo in new GroupBox[] { groupBox2, groupBox3, groupBox4, groupBoxPlus })
                {
                    foo.Location = new Point(foo.Location.X, foo.Location.Y - amountToShrinkWindow);
                }
                Height -= amountToShrinkWindow;
                if (DataSource.id == J2LFile.SpriteLayerID || DataSource.id == 7)
                {
                    Copy4.Hide();
                }
                ReadLayer(DataSource);
            }
            else
            {
                LayerSelect.Items.AddRange(SourceForm.J2L.AllLayers.ToArray());
                LayerSelect.SelectedIndex = CurrentLayer;
            }
        }
Ejemplo n.º 5
0
 private void ApplyButton_Click(object sender, RoutedEventArgs e)
 {
     ButtonApply?.Invoke();
 }