Exemple #1
0
        private void ChangeMapIDs(IEnumerable <MapIDControl> boxes, MapStatus area)
        {
            var input = new IDInputDialog(boxes.First().ID);

            input.ShowDialog(this);
            if (input.Confirmed)
            {
                long firstid;
                if (input.WantsAuto)
                {
                    firstid = Controller.GetSafeID();
                }
                else
                {
                    firstid = input.SelectedID;
                }
                int count = Controller.ChangeMapIDs(boxes, firstid, area, MapReplaceOption.Info);
                if (count > 0)
                {
                    var picker = new ReplaceOptionDialog(count);
                    picker.ShowDialog(this);
                    Controller.ChangeMapIDs(boxes, firstid, area, picker.SelectedOption);
                }
                else
                {
                    Controller.ChangeMapIDs(boxes, firstid, area, MapReplaceOption.Skip);
                }
            }
        }
Exemple #2
0
        private void SendMapsWithMessage(IEnumerable <MapIDControl> maps, string destination)
        {
            int conflicts = Controller.SendMapsToWorld(maps, MapReplaceOption.Info, destination);

            if (conflicts > 0)
            {
                var option = new ReplaceOptionDialog(conflicts);
                option.ShowDialog(this);
                Controller.SendMapsToWorld(maps, option.SelectedOption, destination);
            }
            else
            {
                Controller.SendMapsToWorld(maps, MapReplaceOption.ReplaceExisting, destination);
            }
        }